<?php

use yii\db\Migration;

class m170914_020040_alter_user_table extends Migration
{
    public function safeUp()
    {
//        $this->addColumn('user', 'realname', 'string not null comment "姓名" after `username`');
//        $this->addColumn('user', 'department', 'string not null comment "部门" after `realname`');
//        $this->addColumn('user', 'post', 'string not null comment "岗位" after `department`');
//        $this->addColumn('user','is_leader','string not null default "否" comment"是否为部门领导" after `post`');
    }

    public function safeDown()
    {
//        echo "m170914_020040_alter_user_table cannot be reverted.\n";
//
//        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m170914_020040_alter_user_table cannot be reverted.\n";

        return false;
    }
    */
}
